home *** CD-ROM | disk | FTP | other *** search
/ The CICA Windows Explosion! / The CICA Windows Explosion! - Disc 2.iso / programr / wtj009.zip / METAFILE.ZIP / METASAVE.PAS < prev   
Pascal/Delphi Source File  |  1992-09-04  |  700b  |  29 lines

  1. program metasave;
  2.  
  3. Uses WinProcs, WinTypes;
  4.  
  5. procedure Meta2Aldus (SrcMeta:THandle; var Place:TRect;
  6.                     nUnit:Integer; FName:PChar); far;
  7.                     external 'ameta';
  8.  
  9. Var
  10.   hMetaDC:HDC;
  11.   hMeta:THandle;
  12.   MyRect:TRect;
  13.  
  14. Begin
  15.   hMetaDC := CreateMetaFile (Nil);
  16.   SetWindowOrg (hMetaDC, 0, 0);
  17.   SetWindowExt (hMetaDC, 100, 100);
  18.   Rectangle (hMetaDC, 0, 0, 100, 100);
  19.   MoveTo (hMetaDC, 0, 0);
  20.   LineTo (hMetaDC, 100, 100);
  21.   MoveTo (hMetaDC, 0, 100);
  22.   LineTo (hMetaDC, 100, 0);
  23.   hMeta := CloseMetaFile (hMetaDC);
  24.   MyRect.Right := 1000;
  25.   MyRect.Bottom := 1400;
  26.   Meta2Aldus (hMeta, MyRect, 10, 'MYMETA.WMF');
  27.   DeleteMetaFile (hMeta);
  28. End.
  29.